package org.nanfang.Suaizi;

public class Suaizi extends Thread{
    private int sum ;
    private int count ;

    private int zong;

    public Suaizi(int zong) {
        this.zong = zong;
    }

    public int getZong() {
        return zong;
    }

    public void setZong(int zong) {
        this.zong = zong;
    }

    public int getSum() {
        return sum;
    }

    public void setSum(int sum) {
        this.sum = sum;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public Suaizi(int sum, int count) {
        this.sum = sum;
        this.count = count;
    }

    public Suaizi(){
        super();
    }
    @Override
    public void run() {
        for (int i = sum; i <= count ;i++){
            zong = zong + i;
        }
    }
}
